﻿@model FeedBackItem
@{
	PageTitle.AddViewTitle("Обращение", Url.Action("Index"));
	PageTitle.AddViewTitle("От " + Model.Date.ToShortDateString());
	PageTitle.AddViewTitle("Ответ");
}



@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data" })) {
	@Html.Hidden("returnUrl")
	@Html.ValidationSummary()
	<p><span class="red">*</span> - обязательные поля</p>
	<fieldset class="form-horizontal">
		<div>
			@Html.LabelFor(m => m.Date)
			@Model.Date.ToLocalTime().ToLongDateString()&nbsp;@Model.Date.ToLocalTime().ToShortTimeString()
		</div>
		<div>
			@Html.LabelFor(m => m.Sender)
			@Html.TextBoxFor(m => m.Sender)
		</div>
		@if (@ViewData["EmailEnabled"].To<bool>())
		{
	  		<div>
				@Html.LabelFor(m => m.Email)
				@Html.TextBoxFor(m => m.Email)
			</div>
		}
		@if (@ViewData["PhoneEnabled"].To<bool>())
		{
			<div>
				@Html.LabelFor(m => m.Phone)
				@Html.TextBoxFor(m => m.Phone)
			</div>
		}
		<div class="vertical">
			@Html.LabelFor(m => m.Text)
			@Html.TextAreaFor(m => m.Text, new { @class = "editor", style = "width:610px;height:500px;" })
		</div>
		<div class="vertical">
			@Html.LabelFor(m => m.Answer)
			@Html.TextAreaFor(m => m.Answer, new { @class = "editor", style = "width:610px;height:500px;" })
		</div>
	</fieldset>
	
	<div class="form-buttons">
		<input type="submit" value="Сохранить" />&nbsp;
		<a href="@ViewData["returnUrl"]">Отменить</a>
	</div>
}